home *** CD-ROM | disk | FTP | other *** search
/ Delphi Developer's Kit 1996 / Delphi Developer's Kit 1996.iso / power / wordapi / testwll.pas < prev    next >
Pascal/Delphi Source File  |  1995-12-22  |  935b  |  42 lines

  1. LIBRARY TestWLL;
  2. { sample Word6 add-in .WLL }
  3.  
  4. USES
  5.   WinTypes, WinProcs,
  6.   {$IFDEF VER70} Strings, {$ELSE Delphi} SysUtils, {$ENDIF}
  7.   WdCmds, WdFid, CapiLib;
  8.  
  9. {$I TEST.INC}  { see TEST.INC for details ;-}
  10.  
  11. (****************************************************************************
  12.                     exported procs, called by Word
  13.  ****************************************************************************)
  14. FUNCTION WdAutoOpen(docID : Integer) : Integer;      EXPORT;
  15. { called by WinWord at load time }
  16. CONST
  17.   INIT_FAIL = 0;
  18.   INIT_SUCCESS = 1;
  19. VAR
  20.   i : Integer;
  21. BEGIN
  22.   MessageBox(0, 'Hello World!', 'TESTWLL', MB_OK);
  23.   Test1;
  24.   WdAutoOpen := INIT_SUCCESS; { success }
  25. END;
  26.  
  27.  
  28. PROCEDURE WdAutoRemove;       EXPORT;
  29. { called by WinWord at unload time }
  30. BEGIN
  31.   MessageBox(0, 'Unloading..', 'TESTWLL', MB_OK);
  32. END;
  33.  
  34.  
  35. EXPORTS
  36.   WdAutoOpen INDEX 1,
  37.   WdAutoRemove INDEX 2;
  38.  
  39. BEGIN
  40. END.
  41.  
  42.